<template>
  <div class="reply-box">
    <div class="box-l">
      <img class="head-img" :src="content.headPortrait" alt="">
    </div>
    <div class="box-r">
      <div class="r-top">
        <div class="name">
          <p>{{content.replierName}}</p>
          <p class="green">{{content.position}}</p>
        </div>
        <div class="zan">
          <span>{{content.likeIt > 1000 ? '999+' : content.likeIt}}</span>
        </div>
      </div>
      <div class="reply-content" v-html="content.content"></div>
      <div class="reply-time">{{content.time | formatTime('YY-MM-DD HH:mm')}}</div>
    </div>
  </div>
</template>

<script>
export default {
  name: "reply",
  props: {
    content: {
      type: Object,
      default: {}
    }
  }
}
</script>

<style scoped lang="less">
@import "../style/var";

.reply-box {
  position: relative;
  display: flex;
  padding-top: 20px;
  padding-left: 10px;

  .box-l {
    flex: 0 0 120px;
    text-align: center;

    .head-img {
      width: 80px;
      height: 80px;
      border-radius: 50%;
    }
  }

  .box-r {
    flex: 1;
    .border-bottom();
    padding-right: 30px;

    .r-top {
      display: flex;
      align-items: center;
      justify-content: space-between;

      .name {
        line-height: 1.6;
        font-weight: bold;
        margin-bottom: 10px;

        .green {
          font-weight: normal;
          font-size: 24px;
        }
      }
    }

    .reply-content {
      text-align: justify;
    }

    .reply-time {
      margin-top: 20px;
      margin-bottom: 30px;
      font-size: 24px;
      color: @gray;
    }
  }
}
</style>
